package com.wl.dzt.sys.controller.view;

import com.wl.dzt.sys.controller.result.ActionResult;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wl_code@163.com
 * @date 2018/7/5/005
 * @version 1.0
 * @description 请求转发视图
 * 用于执行url跳转
 *
 */
@Component
public class UrlFlowerView implements View {

    /**
     * <b>转发视图</b>

     *
     * @param actionResult
     * @param response
     * @param request
     * @return
     */
    public String doView(ActionResult actionResult, HttpServletResponse response, HttpServletRequest request) {
        return "/" + actionResult.getUrl();
    }

}
